*( LOCK.CMD - LOCKING PROGRAM )
SET MESSAGES OFF
OPEN concomp
SET ERROR MESSAGES OFF
SET ERROR VARIABLE errvar
SET VAR resp TEXT
NEWPAGE
WRITE "Product No.:" AT 4 5
WRITE "Current List Price:" AT 6 5
WRITE "New List Price:" AT 7 5
SET LOCK product ON
IF errvar NE 0 THEN
   RUN errlock
ENDIF
SET POINTER #2 ptr2 FOR product SORTED BY model WHERE +
model EQ ?X*
WHILE ptr2 EQ 0 THEN
  SET VAR vmodel TO model IN #2
  IF vmodel EQ CX* THEN
    SET VAR incr = 105
  ENDIF
  IF vmodel EQ MX* THEN
    SET VAR incr = 104
  ENDIF
  IF vmodel EQ PX* THEN
    SET VAR incr = 103
  ENDIF
  SET VAR vlistprc = listprce IN #2
  SET VAR vnewprc = (.incr % .vlistprc)
  SHOW VAR vmodel AT 4 18
  SHOW VAR vlistprc AT 6 23
  SHOW VAR vnewprc AT 7 23
  FILLIN resp=0 USING "Enter the change? Y/N " AT 9 5
  IF resp EQ Y THEN
    CHANGE listprce TO .vnewprc IN #2
  ENDIF
NEXT #2 ptr2
ENDWHILE
SET LOCK product OFF
CLEAR resp ptr2 vmodel vlistprc vnewprc incr errvar
SET MESSAGES ON
SET ERROR MESSAGES ON
RETURN
